<template>
  <div>
    <el-card shadow="never">
      <el-menu :default-active="active" >
        <template v-for="item in constantRouterMap">
          <el-menu-item
            v-if="item.meta&&item.meta.type=='user'&& !item.meta.LoginRequired &&(!mini||!item.meta.mini)"
            :key="item.path"
            :index="item.path"
          >
          <g-link :to="item.path">
            <i :class="item.meta.icon"></i>
            <span slot="title">
            <span >{{item.meta.title}}</span>
            </span>
          </g-link>
          </el-menu-item>
        </template>
      </el-menu>
    </el-card>
  </div>
</template>

<script>
import { constantRouterMap } from "./router";
export default {
  data() {
    return {
      constantRouterMap,
      active: "",
      parentUrl: "",
      menuList: [],
      mini: "",
    };
  },

  mounted() {
    let arr = this.$route.path.split("/");
    this.active = "/" + arr[1] + "/" + arr[2];
  },
  methods: {},
};
</script>